package com.classtwo.colleage.tool;

import java.sql.Timestamp;

public class StringToTimeStamp {
    public static Timestamp str2TimeStamp(String date){
        StringBuffer sb =new StringBuffer(date);
        String deadline= sb.append(" 00:00:00").toString();
        Timestamp ts = new Timestamp(System.currentTimeMillis());
        try {
            ts = Timestamp.valueOf(deadline);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ts;
    }
}
